{layout name="common/layout" /}

<div class="da">
    <!---->
    <div class="picFocus">
        <div class="bd">
            <ul>
                {foreach name="__goods__.images" id="image"}
                <li><img src="{$image|cdnurl}"/></li>
                {/foreach}
            </ul>
        </div>

        <div class="hd">
            <ul>
                {foreach name="__goods__.images" id="image"}
                <li><img src="{$image|cdnurl}"/></li>
                {/foreach}
            </ul>
        </div>

    </div>
    <script type="text/javascript">jQuery(".picFocus").slide({mainCell: ".bd ul", effect: "left", autoPlay: true});</script>


    <!---->
    <div class="shop_rx">
        <form action="{:addon_url('shop/checkout/index')}" method="post">
            <input type="hidden" name="ids" value="{$__goods__.id}"/>
            <input type="hidden" name="sku" value=""/>
            <input type="hidden" name="skuId" value=""/>
            <input type="hidden" name="spectype" value="{:$__goods__.spectype}"/>
            <input type="hidden" name="sceneval" value="2"/>
            <div class="shop_rx1"><h1>{$__goods__.title}</h1>
                <p>{$__goods__.subtitle}</p></div>
            <div class="shop_rx2"><span>¥{$__goods__.price}</span><b>¥{$__goods__.marketprice}</b></div>
            <div class="shop_rx3"><span>优惠券</span>
                {foreach name="couponList" item="item"}
                <a href="{$item.url}">
                    <p>满{$item['result_data']['money']}元{eq name="item.result" value="1"}减{else/}打{/eq}{$item['result_data']['number']}{eq name="item.result" value="1"}元{else/}折{/eq}</p>
                </a>
                {/foreach}
            </div>
            {foreach name="__goods__.sku_spec" id="spec"}s
            <div class="shop_rx4"><span>{$spec.title}</span>
                {foreach name="spec.sku_value" id="spec"}
                <a href="javascript:;" title="{$spec.title}">{$spec.title}</a>
                {/foreach}
            </div>
            {/foreach}
            <div class="shop_rx4"><span>库存</span><b>{$__goods__.stocks}件</b></div>
            <div class="shop_rx4"><span>数量</span>
                <div id="a" class="Spinnerr"></div>
            </div>
            <div class="shop_rx5">
                <a href="javascript:void(0);" class="ss1 btn-buynow" data-id="{$__goods__.id}">立即购买</a>
                <a href="javascript:void(0);" class="ss2 btn-cart" data-id="{$__goods__.id}" data-sku-id="">加入购物车</a>
            </div>
        </form>
    </div>
    <div class="clearfix"></div>
</div>

<script type="text/javascript">
    $(function () {

        $("#a").Spinner({
            value: 1, min: 1, len: 3, max: 1000
        });

        $("#b").Spinner({value: 99});

        $("#c").Spinner({value: 66});

        $("#d").Spinner();

    });
</script>


<div class="da">
    <div class="shop_left">
        <div class="shop_left1">
            <span>推荐商品</span>
            <ul>
                {shop:goodslist flag="recommend" id="goods" row="5"}
                <li><a href="{$goods.url}">
                    <img src="{$goods.image|cdnurl}" width="70" height="70"/>
                    <h1>{$goods.subtitle}</h1>
                    <p>¥{$goods.price}</p><b>¥{$goods.marketprice}</b>
                </a></li>
                {/shop:goodslist}

            </ul>
        </div>

        <div class="shop_left1">
            <span>热门商品</span>
            <ul>
                {shop:goodslist flag="hot" id="goods" row="5"}
                <li><a href="{$goods.url}">
                    <img src="{$goods.image|cdnurl}" width="70" height="70"/>
                    <h1>{$goods.subtitle}</h1>
                    <p>¥{$goods.price}</p><b>¥{$goods.marketprice}</b>
                </a></li>
                {/shop:goodslist}

            </ul>
        </div>

    </div>

    <!---->
    <div class="slideTxtBox_s">
        <div class="hd">


            <ul>
                <li>商品详情</li>
                <li>商品评价({:$commentList->total()})</li>
                <li>专享服务</li>
            </ul>
        </div>
        <div class="bd">
            <ul>
                <li>
                    <div class="shop_pp_1">
                        {$__goods__.content}
                    </div>
                </li>
            </ul>
            <ul>
                <li>
                    {foreach name="$commentList" id="comment"}
                    <div class="shop_pp_2">
                        <img src="{$comment.user.avatar}" width="40" height="40"/>
                        <div class="shop_pp_2_1">
                            <span>{$comment.user.nickname}<b>{$comment.createtime|human_date}</b></span>
                            <p>{$comment.content}</p>
                        </div>
                        <div class="shop_pp_2_2">
                            {for start="5" end="1" comparison=">=" step="-1"}
                            <p class="on">★</p>
                            {/for}
                        </div>
                        {foreach $comment.reply as $v}
                        <div style="margin-left: 200px;background-color: red;">
                            <div class="shop_pp_2_1">
                                <span>{$v.user.nickname}<b>{$v.createtime|human_date}</b></span>
                                <p>{$v.content}</p>
                            </div>
                        </div>
                        {/foreach}
                    </div>
                    {/foreach}
                    <style>
                        .pagination {
                            display: flex;
                        }

                        .pagination li {
                            margin: 10px;
                            padding: 10px;
                            width: 30px !important;
                            text-align: center;
                            border: 1px solid grey;
                            border-radius: 5px;
                        }
                    </style>
                    <div>{$commentList->render()}</div>
                </li>
            </ul>
            <ul>
                <li>
                    {foreach name="guarantee" item="item" empty="暂时没有数据" }
                    <div class="shop_pp_3"><img src="{$item.image}" width="52" height="53"/>
                        <p>{$item.name}<br/>{$item.intro}</p></div>
                    {/foreach}
                </li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">jQuery(".slideTxtBox_s").slide();</script>
    <!---->
</div>

<!--@formatter:off-->
<script type="text/javascript">
  var GOODS = {
      "marketprice": "{$__goods__.marketprice}",
      "price": "{$__goods__.price}",
      "stocks": "{$__goods__.stocks}",
      "pricelist": {$priceList|json_encode}
  };
</script>
<!--@formatter:on-->

<script data-render="script" src="__ADDON__/js/goods.js?v={$site.version}"></script>
